﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Friend
    {
        private IFriend dal;
        public Friend()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateFriend();
        }
        #region friend_add.aspx
        public DataTable sel_friendInfo(string UserNum,int flag)
        {
            return dal.sel_friendInfo(UserNum,flag);
        }
        public int sel_userFriend(string UserNum, string bUserName)
        {
            return dal.sel_userFriend(UserNum, bUserName);
        }
        public string sel_userInfo(string UserNum, int flag)
        {
            return dal.sel_userInfo(UserNum,flag);
        }
        public int add_Reformation(STRequestinformation Req,int flag)
        {
            return dal.add_Reformation(Req, flag);
        }
        public int add_Friend(STFriend Fri, string UserNum, int flag)
        {
            return dal.add_Friend(Fri,UserNum,flag);
        }
        #endregion

        #region friend_Establishment.aspx
        public string sel_sysUser(string UserNum)
        {
            return dal.sel_sysUser(UserNum);
        }
        public int Update(int FE, string UserNum)
        {
            return dal.Update(FE, UserNum);
        }
        #endregion

        #region friendList.aspx
        public int del_Friend(string FriendUserNum,int flag)
        {
            return dal.del_Friend(FriendUserNum,flag);
        }
        #endregion

        #region friendmanage_add.aspx
        public int sel_friendClass(string UserNum,int flag)
        {
            return dal.sel_friendClass(UserNum,flag);
        }
        public string sel_friendClass()
        {
            return dal.sel_friendClass();
        }
        public int add_friendClass(STFriendClass FCl, string UserNum)
        {
            return dal.add_friendClass(FCl, UserNum);
        }
        #endregion

        #region Requestinformation.aspx
        public int update_Information(string bUsername, string qUsername,int flag)
        {
            return dal.update_Information(bUsername, qUsername, flag);
        }

        public int add_userFriend(string FriendUserNum, string UserNum, string bUserName, string bdUserName, string Hail_Fellow, DateTime CreatTime)
        {
            return dal.add_userFriend(FriendUserNum, UserNum, bUserName, bdUserName, Hail_Fellow, CreatTime);
        }

        public int del_userInfo(string UserName, int ID)
        {
            return dal.del_userInfo(UserName, ID);
        }
        #endregion
    }
}